From dde0d5ffa5335ae7e12ae8103ad89d90bfda6601 Mon Sep 17 00:00:00 2001 From: Michael Natterer Date: Thu, 7 Jun 2007 21:22:15 +0000 Subject: [PATCH] add gdk_gc_quartz_init() and set some values to the defaults used by X11. 2007-06-07 Michael Natterer * gdk/quartz/gdkgc-quartz.c: add gdk_gc_quartz_init() and set some values to the defaults used by X11. (gdk_quartz_gc_set_values): really set cap_style when GDK_GC_CAP_STYLE is in the mask, not line_style. svn path=/trunk/; revision=18079 --- ChangeLog | 8 ++++++++ gdk/quartz/gdkgc-quartz.c | 16 ++++++++++++++-- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index c3de6f3a6b..1e2f5ef949 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2007-06-07 Michael Natterer + + * gdk/quartz/gdkgc-quartz.c: add gdk_gc_quartz_init() and set + some values to the defaults used by X11. + + (gdk_quartz_gc_set_values): really set cap_style when + GDK_GC_CAP_STYLE is in the mask, not line_style. + 2007-06-07 Michael Natterer * gdk/quartz/gdkgc-quartz.c (_gdk_quartz_gc_update_cg_context): diff --git a/gdk/quartz/gdkgc-quartz.c b/gdk/quartz/gdkgc-quartz.c index 26273e1a36..159d707dbf 100644 --- a/gdk/quartz/gdkgc-quartz.c +++ b/gdk/quartz/gdkgc-quartz.c @@ -101,7 +101,7 @@ gdk_quartz_gc_set_values (GdkGC *gc, private->line_style = values->line_style; if (mask & GDK_GC_CAP_STYLE) - private->line_style = values->line_style; + private->cap_style = values->cap_style; if (mask & GDK_GC_JOIN_STYLE) private->join_style = values->join_style; @@ -150,6 +150,18 @@ gdk_gc_quartz_class_init (GdkGCQuartzClass *klass) gc_class->set_dashes = gdk_quartz_gc_set_dashes; } +static void +gdk_gc_quartz_init (GdkGCQuartz *gc_quartz) +{ + gc_quartz->function = GDK_COPY; + gc_quartz->subwindow_mode = GDK_CLIP_BY_CHILDREN; + gc_quartz->graphics_exposures = TRUE; + gc_quartz->line_width = 0; + gc_quartz->line_style = GDK_LINE_SOLID; + gc_quartz->cap_style = GDK_CAP_BUTT; + gc_quartz->join_style = GDK_JOIN_MITER; +} + GType _gdk_gc_quartz_get_type (void) { @@ -167,7 +179,7 @@ _gdk_gc_quartz_get_type (void) NULL, /* class_data */ sizeof (GdkGCQuartz), 0, /* n_preallocs */ - (GInstanceInitFunc) NULL, + (GInstanceInitFunc) gdk_gc_quartz_init, }; object_type = g_type_register_static (GDK_TYPE_GC, -- 2.30.2